This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cloudflare_zone.api-samplesite-com: Creating... | |
Error: Error creating zone "api.samplesite.com": error from makeRequest: HTTP status 400: content "{\"success\":false,\"errors\":[{\"code\":1116,\"message\":\"Please ensure you are providing the root domain and not any subdomains (e.g., example.com, not subdomain.example.com)\"}],\"messages\":[],\"result\":null}" | |
on DNS-CF-api-samplesite-com.tf line 6, in resource "cloudflare_zone" "api-samplesite-com": | |
6: resource "cloudflare_zone" "api-samplesite-com" { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ensure process.env contains all the needed environment variables. | |
const kafka = require('node-rdkafka') | |
console.log(JSON.stringify(kafka.features)) | |
// ["gzip","snappy","ssl","sasl","regex","lz4","sasl_gssapi","sasl_plain","sasl_scram","plugins","zstd","sasl_oauthbearer"] | |
const createProducer = (onDeliveryReport) => { | |
const producer = new kafka.Producer({ | |
'metadata.broker.list': process.env.KAFKA_BROKERS_LIST, | |
'sasl.username': process.env.KAFKA_CLIENT_USERNAME, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
data: | |
.dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL2djci5pbyI6eyJ1c2VybmFtZSI6Il9qc29uX2tleSIsInBhc3N3b3JkIjoidGVzdCIsImVtYWlsIjoieW91cmVtYWlsQGV4YW1wbGUuY29tIiwiYXV0aCI6IlgycHpiMjVmYTJWNU9uUmxjM1E9In19fQ== | |
kind: Secret | |
metadata: | |
creationTimestamp: null | |
name: gcr-json-key | |
namespace: staging | |
type: kubernetes.io/dockerconfigjson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
user-simulator: # an instrumented service | |
build: user-simulator | |
environment: | |
JAEGER_SERVICE_NAME: user-simulator | |
JAEGER_AGENT_HOST: jaeger-agent | |
JAEGER_AGENT_PORT: 6832 | |
JAEGER_SAMPLER_TYPE: const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* api-service */ | |
app.use('/api/v1/whereami', async (req, res, next) => { | |
const parentSpan = createContinuationSpan(tracer, req, 'whereami-request') | |
const childSpan = tracer.startSpan('city-from-ip', {childOf: parentSpan}) | |
const _ = await axios.get(`http://ip-api.com/json/${req.ip}`) | |
childSpan.finish() | |
// Do more work and create more children spans. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* in each service */ | |
var opentracing = require('opentracing') | |
var initTracer = require('jaeger-client').initTracerFromEnv; | |
var tracer = initTracer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* user-simulator */ | |
async function whereami() => { | |
const span = tracer.startSpan('whereami-request') | |
const location = await axios.get(`${process.env.API_SERVER_ADDRESS}/whereami`, { | |
headers: getCarrier(span, tracer) | |
}) | |
span.finish() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
class PSUILoginTestsCompact: XCTestCase { | |
func setUpForFreshInstall() -> XCUIApplication { | |
let app = XCUIApplication() | |
app.launchArguments = ["UI_TESTING"] | |
app.launchEnvironment["SOME_ENV_KEY"] = "SOME_ENV_VALUE" | |
app.launch() | |
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public struct Customer: RemoteModelType { | |
// public init(email: String? = nil, phone: String? = nil, firstName: String? = nil, ...) {} | |
public var billingAddress: Address? { | |
if var address = self.defaultAddress ?? self.addresses.first { | |
address.firstName = address.firstName ?? self.firstName | |
return address.isValidForBilling() ? address : nil | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@testable import Shopify_POS | |
class CustomerDetailsViewControllerTests: PointOfSaleTests { | |
func testDetailsOfflineDisablesEdit() { | |
let customerDataProvider = CustomersDataProvider.Mock() | |
let customerDetails = CustomerDetailsViewController(account: account, customer: createCustomer(), /*...*/ reachability: ReachabilityMock(with: .none)) | |
let navigationController = UINavigationController(rootViewController: customerDetails) | |
navigationController.view.resize(to: .modal) |
NewerOlder